# Environment 
MPI    = mpic++
GCC    = gcc
OBJECT = ListE.o Node.o ListSmile.o SmileStruct.o SmileProfile.o clusterByLINGOS.o 

all: $(OBJECT)
	$(MPI) $(OBJECT) -o clusterByLINGOS -lz

clusterByLINGOS.o: clusterByLINGOS.cpp
	$(MPI) -c clusterByLINGOS.cpp

ListE.o: Node.cpp Node.o
	$(GCC) -c ListE.cpp

Node.o: Node.cpp
	$(GCC) -c Node.cpp

ListSmile.o: ListSmile.cpp SmileStruct.o ListE.o
	$(GCC) -c ListSmile.cpp SmileStruct.o ListE.o

SmileStruct.o: SmileStruct.cpp
	$(GCC) -c SmileStruct.cpp

SmileProfile.o: SmileProfile.cpp
	$(GCC) -c SmileProfile.cpp

clean:
	rm clusterByLINGOS \
	$(OBJECT)